home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / MIDI.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  24.3 KB  |  902 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        MIDI.a
  3. ;
  4. ;    Contains:    MIDI Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1988-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__MIDI__') = 'UNDEFINED' THEN
  18. __MIDI__ SET 1
  19.  
  20.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  21.     include 'Errors.a'
  22.     ENDIF
  23.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  24.     include 'MacTypes.a'
  25.     ENDIF
  26.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  27.     include 'MixedMode.a'
  28.     ENDIF
  29.  
  30. ;                        * * *  N O T E  * * * 
  31. ;
  32. ;    This file has been updated to include MIDI 2.0 interfaces.  
  33. ;    
  34. ;    The MIDI 2.0 interfaces were developed for the classic 68K runtime.
  35. ;    Since then, Apple has created the PowerPC and CFM 68K runtimes.
  36. ;    Currently, the extra functions in MIDI 2.0 are not in InterfaceLib
  37. ;    and thus not callable from PowerPC and CFM 68K runtimes (you'll
  38. ;    get a linker error).  
  39. ;
  40.  
  41.  
  42.  
  43. midiMaxNameLen                    EQU        31                    ;maximum number of characters in port and client names
  44.  
  45.                                                             ; Time formats 
  46. midiFormatMSec                    EQU        0                    ;milliseconds
  47. midiFormatBeats                    EQU        1                    ;beats
  48. midiFormat24fpsBit                EQU        2                    ;24 frames/sec.
  49. midiFormat25fpsBit                EQU        3                    ;25 frames/sec.
  50. midiFormat30fpsDBit                EQU        4                    ;30 frames/sec. drop-frame
  51. midiFormat30fpsBit                EQU        5                    ;30 frames/sec.
  52. midiFormat24fpsQF                EQU        6                    ;24 frames/sec. longInt format 
  53. midiFormat25fpsQF                EQU        7                    ;25 frames/sec. longInt format 
  54. midiFormat30fpsDQF                EQU        8                    ;30 frames/sec. drop-frame longInt format 
  55. midiFormat30fpsQF                EQU        9                    ;30 frames/sec. longInt format 
  56.  
  57. midiInternalSync                EQU        0                    ;internal sync
  58. midiExternalSync                EQU        1                    ;external sync
  59.  
  60.                                                             ; Port types
  61. midiPortTypeTime                EQU        0                    ;time port
  62. midiPortTypeInput                EQU        1                    ;input port
  63. midiPortTypeOutput                EQU        2                    ;output port
  64. midiPortTypeTimeInv                EQU        3                    ;invisible time port
  65. midiPortInvisible                EQU        $8000                ;logical OR this to other types to make invisible ports
  66. midiPortTypeMask                EQU        $0007                ;logical AND with this to convert new port types to old, i.e. to strip the property bits
  67.  
  68.                                                             ; OffsetTimes  
  69. midiGetEverything                EQU        $7FFFFFFF            ;get all packets, regardless of time stamps
  70. midiGetNothing                    EQU        $80000000            ;get no packets, regardless of time stamps
  71. midiGetCurrent                    EQU        $00000000            ;get current packets only
  72. ;     MIDI data and messages are passed in MIDIPacket records (see below).
  73. ;    The first byte of every MIDIPacket contains a set of flags
  74. ;
  75. ;    bits 0-1    00 = new MIDIPacket, not continued
  76. ;                     01 = begining of continued MIDIPacket
  77. ;                     10 = end of continued MIDIPacket
  78. ;                     11 = continuation
  79. ;    bits 2-3     reserved
  80. ;
  81. ;    bits 4-6      000 = packet contains MIDI data
  82. ;
  83. ;                  001 = packet contains MIDI Manager message
  84. ;
  85. ;    bit 7         0 = MIDIPacket has valid stamp
  86. ;                  1 = stamp with current clock
  87. ;
  88.  
  89.  
  90. midiContMask                    EQU        $03
  91. midiNoCont                        EQU        $00
  92. midiStartCont                    EQU        $01
  93. midiMidCont                        EQU        $03
  94. midiEndCont                        EQU        $02
  95. midiTypeMask                    EQU        $70
  96. midiMsgType                        EQU        $00
  97. midiMgrType                        EQU        $10
  98. midiTimeStampMask                EQU        $80
  99. midiTimeStampCurrent            EQU        $80
  100. midiTimeStampValid                EQU        $00
  101.  
  102.                                                             ; MIDIPacket command words (the first word in the data field for midiMgrType messages) 
  103. midiOverflowErr                    EQU        $0001
  104. midiSCCErr                        EQU        $0002
  105. midiPacketErr                    EQU        $0003                ;all command words less than this value are error indicators
  106. midiMaxErr                        EQU        $00FF
  107.  
  108.                                                             ; Valid results to be returned by readHooks 
  109. midiKeepPacket                    EQU        0
  110. midiMorePacket                    EQU        1
  111. midiNoMorePacket                EQU        2
  112. midiHoldPacket                    EQU        3
  113.  
  114.                                                             ; Driver calls 
  115. midiOpenDriver                    EQU        1
  116. midiCloseDriver                    EQU        2
  117.  
  118. mdvrAbortNotesOff                EQU        0                    ;abort previous mdvrNotesOff request
  119. mdvrChanNotesOff                EQU        1                    ;generate channel note off messages
  120. mdvrAllNotesOff                    EQU        2                    ;generate all note off messages
  121.  
  122. mdvrStopOut                        EQU        0                    ;stop calling MDVROut temporarily
  123. mdvrStartOut                    EQU        1                    ;resume calling MDVROut
  124. MIDIPacket                RECORD 0
  125. flags                     ds.b    1                ; offset: $0 (0)
  126. len                         ds.b    1                ; offset: $1 (1)
  127. tStamp                     ds.l    1                ; offset: $2 (2)
  128. data                     ds.b    249                ; offset: $6 (6)
  129.                          ORG 256
  130. sizeof                     EQU *                    ; size:   $100 (256)
  131.                         ENDR
  132. ; typedef struct MIDIPacket *            MIDIPacketPtr
  133.  
  134. MIDIClkInfo                RECORD 0
  135. syncType                 ds.w    1                ; offset: $0 (0)        ; synchronization external/internal
  136. curTime                     ds.l    1                ; offset: $2 (2)        ; current value of port's clock
  137. format                     ds.w    1                ; offset: $6 (6)        ; time code format
  138. sizeof                     EQU *                    ; size:   $8 (8)
  139.                         ENDR
  140. MIDIIDRec                RECORD 0
  141. clientID                 ds.l    1                ; offset: $0 (0)
  142. portID                     ds.l    1                ; offset: $4 (4)
  143. sizeof                     EQU *                    ; size:   $8 (8)
  144.                         ENDR
  145. MIDIPortInfo            RECORD 0
  146. portType                 ds.w    1                ; offset: $0 (0)        ; type of port
  147. timeBase                 ds        MIDIIDRec        ; offset: $2 (2)        ; MIDIIDRec for time base
  148. numConnects                 ds.w    1                ; offset: $A (10)        ; number of connections
  149. cList                     ds        MIDIIDRec        ; offset: $C (12) <-- really an array of length one ; ARRAY [1..numConnects] of MIDIIDRec
  150. sizeof                     EQU *                    ; size:   $14 (20)
  151.                         ENDR
  152. ; typedef struct MIDIPortInfo *            MIDIPortInfoPtr
  153.  
  154. ; typedef MIDIPortInfoPtr *                MIDIPortInfoHdl
  155.  
  156. ; typedef MIDIPortInfoPtr *                MIDIPortInfoHandle
  157.  
  158. MIDIPortParams            RECORD 0
  159. portID                     ds.l    1                ; offset: $0 (0)        ; ID of port, unique within client
  160. portType                 ds.w    1                ; offset: $4 (4)        ; Type of port - input, output, time, etc.
  161. timeBase                 ds.w    1                ; offset: $6 (6)        ; refnum of time base, 0 if none
  162. offsetTime                 ds.l    1                ; offset: $8 (8)        ; offset for current time stamps
  163. readHook                 ds.l    1                ; offset: $C (12)        ; routine to call when input data is valid
  164. refCon                     ds.l    1                ; offset: $10 (16)        ; refcon for port (for client use)
  165. initClock                 ds        MIDIClkInfo        ; offset: $14 (20)        ; initial settings for a time base
  166. name                     ds        Str255            ; offset: $1C (28)        ; name of the port, This is a real live string, not a ptr.
  167. sizeof                     EQU *                    ; size:   $11C (284)
  168.                         ENDR
  169. ; typedef struct MIDIPortParams *        MIDIPortParamsPtr
  170.  
  171. MIDIIDList                RECORD 0
  172. numIDs                     ds.w    1                ; offset: $0 (0)
  173. list                     ds.l    1                ; offset: $2 (2) <-- really an array of length one
  174. sizeof                     EQU *                    ; size:   $6 (6)
  175.                         ENDR
  176. ; typedef struct MIDIIDList *            MIDIIDListPtr
  177.  
  178. ; typedef MIDIIDListPtr *                MIDIIDListHdl
  179.  
  180. ; typedef MIDIIDListPtr *                MIDIIDListHandle
  181.  
  182. ;  MDVR Control structs
  183. MDVRInCtlRec            RECORD 0
  184. timeCodeClock             ds.w    1                ; offset: $0 (0)        ; refnum of time base for time code
  185. timeCodeFormat             ds.w    1                ; offset: $2 (2)        ; format of time code output
  186. readProc                 ds.l    1                ; offset: $4 (4)        ; proc to call with intput characters
  187. commProc                 ds.l    1                ; offset: $8 (8)        ; proc to call for handshaking
  188. refCon                     ds.l    1                ; offset: $C (12)        ; refCon passed to readProc, commProc
  189. sizeof                     EQU *                    ; size:   $10 (16)
  190.                         ENDR
  191. ; typedef struct MDVRInCtlRec *            MDVRInCtlPtr
  192.  
  193. MDVROutCtlRec            RECORD 0
  194. timeCodeClock             ds.w    1                ; offset: $0 (0)        ; time base driven by time code
  195. timeCodeFormat             ds.w    1                ; offset: $2 (2)        ; format of time code to listen to
  196. timeCodeProc             ds.l    1                ; offset: $4 (4)        ; proc called on time code fmt change
  197. commProc                 ds.l    1                ; offset: $8 (8)        ; proc called for handshaking
  198. refCon                     ds.l    1                ; offset: $C (12)        ; refCon passed to timeCodeProc
  199. timeCodeFilter             ds.b    1                ; offset: $10 (16)        ; filter time code if true
  200. padding                     ds.b    1                ; offset: $11 (17)        ; unused pad byte
  201. midiMsgTicks             ds.l    1                ; offset: $12 (18)        ; value of Ticks when MIDI msg rcvd
  202. timeCodeTicks             ds.l    1                ; offset: $16 (22)        ; value of Ticks when time code rcvd
  203. sizeof                     EQU *                    ; size:   $1A (26)
  204.                         ENDR
  205. ; typedef struct MDVROutCtlRec *        MDVROutCtlPtr
  206.  
  207. ; typedef void *                        MDVRPtr
  208.  
  209. ;
  210. ; pascal NumVersion MIDIVersion(void )
  211. ;
  212.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  213.         Macro
  214.         _MIDIVersion
  215.             move.l              #$00000004,D0
  216.             dc.w                $A800
  217.         EndM
  218.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  219.         IMPORT_CFM_FUNCTION MIDIVersion
  220.     ENDIF
  221.  
  222. ;
  223. ; pascal OSErr MIDISignIn(OSType clientID, long refCon, Handle icon, ConstStr255Param name)
  224. ;
  225.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  226.         Macro
  227.         _MIDISignIn
  228.             move.l              #$00040004,D0
  229.             dc.w                $A800
  230.         EndM
  231.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  232.         IMPORT_CFM_FUNCTION MIDISignIn
  233.     ENDIF
  234.  
  235. ;
  236. ; pascal void MIDISignOut(OSType clientID)
  237. ;
  238.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  239.         Macro
  240.         _MIDISignOut
  241.             move.l              #$00080004,D0
  242.             dc.w                $A800
  243.         EndM
  244.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  245.         IMPORT_CFM_FUNCTION MIDISignOut
  246.     ENDIF
  247.  
  248. ;
  249. ; pascal MIDIIDListHandle MIDIGetClients(void )
  250. ;
  251.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  252.         Macro
  253.         _MIDIGetClients
  254.             move.l              #$000C0004,D0
  255.             dc.w                $A800
  256.         EndM
  257.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  258.         IMPORT_CFM_FUNCTION MIDIGetClients
  259.     ENDIF
  260.  
  261. ;
  262. ; pascal void MIDIGetClientName(OSType clientID, Str255 name)
  263. ;
  264.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  265.         Macro
  266.         _MIDIGetClientName
  267.             move.l              #$00100004,D0
  268.             dc.w                $A800
  269.         EndM
  270.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  271.         IMPORT_CFM_FUNCTION MIDIGetClientName
  272.     ENDIF
  273.  
  274. ;
  275. ; pascal void MIDISetClientName(OSType clientID, ConstStr255Param name)
  276. ;
  277.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  278.         Macro
  279.         _MIDISetClientName
  280.             move.l              #$00140004,D0
  281.             dc.w                $A800
  282.         EndM
  283.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  284.         IMPORT_CFM_FUNCTION MIDISetClientName
  285.     ENDIF
  286.  
  287. ;
  288. ; pascal MIDIIDListHandle MIDIGetPorts(OSType clientID)
  289. ;
  290.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  291.         Macro
  292.         _MIDIGetPorts
  293.             move.l              #$00180004,D0
  294.             dc.w                $A800
  295.         EndM
  296.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  297.         IMPORT_CFM_FUNCTION MIDIGetPorts
  298.     ENDIF
  299.  
  300. ;
  301. ; pascal OSErr MIDIAddPort(OSType clientID, short BufSize, short *refnum, MIDIPortParamsPtr init)
  302. ;
  303.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  304.         Macro
  305.         _MIDIAddPort
  306.             move.l              #$001C0004,D0
  307.             dc.w                $A800
  308.         EndM
  309.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  310.         IMPORT_CFM_FUNCTION MIDIAddPort
  311.     ENDIF
  312.  
  313. ;
  314. ; pascal MIDIPortInfoHandle MIDIGetPortInfo(OSType clientID, OSType portID)
  315. ;
  316.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  317.         Macro
  318.         _MIDIGetPortInfo
  319.             move.l              #$00200004,D0
  320.             dc.w                $A800
  321.         EndM
  322.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  323.         IMPORT_CFM_FUNCTION MIDIGetPortInfo
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal OSErr MIDIConnectData(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  328. ;
  329.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  330.         Macro
  331.         _MIDIConnectData
  332.             move.l              #$00240004,D0
  333.             dc.w                $A800
  334.         EndM
  335.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  336.         IMPORT_CFM_FUNCTION MIDIConnectData
  337.     ENDIF
  338.  
  339. ;
  340. ; pascal OSErr MIDIUnConnectData(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  341. ;
  342.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  343.         Macro
  344.         _MIDIUnConnectData
  345.             move.l              #$00280004,D0
  346.             dc.w                $A800
  347.         EndM
  348.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  349.         IMPORT_CFM_FUNCTION MIDIUnConnectData
  350.     ENDIF
  351.  
  352. ;
  353. ; pascal OSErr MIDIConnectTime(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  354. ;
  355.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  356.         Macro
  357.         _MIDIConnectTime
  358.             move.l              #$002C0004,D0
  359.             dc.w                $A800
  360.         EndM
  361.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  362.         IMPORT_CFM_FUNCTION MIDIConnectTime
  363.     ENDIF
  364.  
  365. ;
  366. ; pascal OSErr MIDIUnConnectTime(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  367. ;
  368.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  369.         Macro
  370.         _MIDIUnConnectTime
  371.             move.l              #$00300004,D0
  372.             dc.w                $A800
  373.         EndM
  374.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  375.         IMPORT_CFM_FUNCTION MIDIUnConnectTime
  376.     ENDIF
  377.  
  378. ;
  379. ; pascal void MIDIFlush(short refnum)
  380. ;
  381.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  382.         Macro
  383.         _MIDIFlush
  384.             move.l              #$00340004,D0
  385.             dc.w                $A800
  386.         EndM
  387.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  388.         IMPORT_CFM_FUNCTION MIDIFlush
  389.     ENDIF
  390.  
  391. ;
  392. ; pascal ProcPtr MIDIGetReadHook(short refnum)
  393. ;
  394.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  395.         Macro
  396.         _MIDIGetReadHook
  397.             move.l              #$00380004,D0
  398.             dc.w                $A800
  399.         EndM
  400.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  401.         IMPORT_CFM_FUNCTION MIDIGetReadHook
  402.     ENDIF
  403.  
  404. ;
  405. ; pascal void MIDISetReadHook(short refnum, ProcPtr hook)
  406. ;
  407.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  408.         Macro
  409.         _MIDISetReadHook
  410.             move.l              #$003C0004,D0
  411.             dc.w                $A800
  412.         EndM
  413.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  414.         IMPORT_CFM_FUNCTION MIDISetReadHook
  415.     ENDIF
  416.  
  417. ;
  418. ; pascal void MIDIGetPortName(OSType clientID, OSType portID, Str255 name)
  419. ;
  420.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  421.         Macro
  422.         _MIDIGetPortName
  423.             move.l              #$00400004,D0
  424.             dc.w                $A800
  425.         EndM
  426.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  427.         IMPORT_CFM_FUNCTION MIDIGetPortName
  428.     ENDIF
  429.  
  430. ;
  431. ; pascal void MIDISetPortName(OSType clientID, OSType portID, ConstStr255Param name)
  432. ;
  433.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  434.         Macro
  435.         _MIDISetPortName
  436.             move.l              #$00440004,D0
  437.             dc.w                $A800
  438.         EndM
  439.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  440.         IMPORT_CFM_FUNCTION MIDISetPortName
  441.     ENDIF
  442.  
  443. ;
  444. ; pascal void MIDIWakeUp(short refnum, long time, long period, MIDITimeUPP timeProc)
  445. ;
  446.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  447.         Macro
  448.         _MIDIWakeUp
  449.             move.l              #$00480004,D0
  450.             dc.w                $A800
  451.         EndM
  452.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  453.         IMPORT_CFM_FUNCTION MIDIWakeUp
  454.     ENDIF
  455.  
  456. ;
  457. ; pascal void MIDIRemovePort(short refnum)
  458. ;
  459.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  460.         Macro
  461.         _MIDIRemovePort
  462.             move.l              #$004C0004,D0
  463.             dc.w                $A800
  464.         EndM
  465.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  466.         IMPORT_CFM_FUNCTION MIDIRemovePort
  467.     ENDIF
  468.  
  469. ;
  470. ; pascal short MIDIGetSync(short refnum)
  471. ;
  472.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  473.         Macro
  474.         _MIDIGetSync
  475.             move.l              #$00500004,D0
  476.             dc.w                $A800
  477.         EndM
  478.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  479.         IMPORT_CFM_FUNCTION MIDIGetSync
  480.     ENDIF
  481.  
  482. ;
  483. ; pascal void MIDISetSync(short refnum, short sync)
  484. ;
  485.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  486.         Macro
  487.         _MIDISetSync
  488.             move.l              #$00540004,D0
  489.             dc.w                $A800
  490.         EndM
  491.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  492.         IMPORT_CFM_FUNCTION MIDISetSync
  493.     ENDIF
  494.  
  495. ;
  496. ; pascal long MIDIGetCurTime(short refnum)
  497. ;
  498.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  499.         Macro
  500.         _MIDIGetCurTime
  501.             move.l              #$00580004,D0
  502.             dc.w                $A800
  503.         EndM
  504.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  505.         IMPORT_CFM_FUNCTION MIDIGetCurTime
  506.     ENDIF
  507.  
  508. ;
  509. ; pascal void MIDISetCurTime(short refnum, long time)
  510. ;
  511.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  512.         Macro
  513.         _MIDISetCurTime
  514.             move.l              #$005C0004,D0
  515.             dc.w                $A800
  516.         EndM
  517.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  518.         IMPORT_CFM_FUNCTION MIDISetCurTime
  519.     ENDIF
  520.  
  521. ;
  522. ; pascal void MIDIStartTime(short refnum)
  523. ;
  524.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  525.         Macro
  526.         _MIDIStartTime
  527.             move.l              #$00600004,D0
  528.             dc.w                $A800
  529.         EndM
  530.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  531.         IMPORT_CFM_FUNCTION MIDIStartTime
  532.     ENDIF
  533.  
  534. ;
  535. ; pascal void MIDIStopTime(short refnum)
  536. ;
  537.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  538.         Macro
  539.         _MIDIStopTime
  540.             move.l              #$00640004,D0
  541.             dc.w                $A800
  542.         EndM
  543.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  544.         IMPORT_CFM_FUNCTION MIDIStopTime
  545.     ENDIF
  546.  
  547. ;
  548. ; pascal void MIDIPoll(short refnum, long offsetTime)
  549. ;
  550.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  551.         Macro
  552.         _MIDIPoll
  553.             move.l              #$00680004,D0
  554.             dc.w                $A800
  555.         EndM
  556.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  557.         IMPORT_CFM_FUNCTION MIDIPoll
  558.     ENDIF
  559.  
  560. ;
  561. ; pascal OSErr MIDIWritePacket(short refnum, MIDIPacketPtr packet)
  562. ;
  563.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  564.         Macro
  565.         _MIDIWritePacket
  566.             move.l              #$006C0004,D0
  567.             dc.w                $A800
  568.         EndM
  569.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  570.         IMPORT_CFM_FUNCTION MIDIWritePacket
  571.     ENDIF
  572.  
  573. ;
  574. ; pascal Boolean MIDIWorldChanged(OSType clientID)
  575. ;
  576.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  577.         Macro
  578.         _MIDIWorldChanged
  579.             move.l              #$00700004,D0
  580.             dc.w                $A800
  581.         EndM
  582.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  583.         IMPORT_CFM_FUNCTION MIDIWorldChanged
  584.     ENDIF
  585.  
  586. ;
  587. ; pascal long MIDIGetOffsetTime(short refnum)
  588. ;
  589.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  590.         Macro
  591.         _MIDIGetOffsetTime
  592.             move.l              #$00740004,D0
  593.             dc.w                $A800
  594.         EndM
  595.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  596.         IMPORT_CFM_FUNCTION MIDIGetOffsetTime
  597.     ENDIF
  598.  
  599. ;
  600. ; pascal void MIDISetOffsetTime(short refnum, long offsetTime)
  601. ;
  602.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  603.         Macro
  604.         _MIDISetOffsetTime
  605.             move.l              #$00780004,D0
  606.             dc.w                $A800
  607.         EndM
  608.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  609.         IMPORT_CFM_FUNCTION MIDISetOffsetTime
  610.     ENDIF
  611.  
  612. ;
  613. ; pascal long MIDIConvertTime(short srcFormat, short dstFormat, long time)
  614. ;
  615.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  616.         Macro
  617.         _MIDIConvertTime
  618.             move.l              #$007C0004,D0
  619.             dc.w                $A800
  620.         EndM
  621.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  622.         IMPORT_CFM_FUNCTION MIDIConvertTime
  623.     ENDIF
  624.  
  625. ;
  626. ; pascal long MIDIGetRefCon(short refnum)
  627. ;
  628.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  629.         Macro
  630.         _MIDIGetRefCon
  631.             move.l              #$00800004,D0
  632.             dc.w                $A800
  633.         EndM
  634.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  635.         IMPORT_CFM_FUNCTION MIDIGetRefCon
  636.     ENDIF
  637.  
  638. ;
  639. ; pascal void MIDISetRefCon(short refnum, long refCon)
  640. ;
  641.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  642.         Macro
  643.         _MIDISetRefCon
  644.             move.l              #$00840004,D0
  645.             dc.w                $A800
  646.         EndM
  647.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  648.         IMPORT_CFM_FUNCTION MIDISetRefCon
  649.     ENDIF
  650.  
  651. ;
  652. ; pascal long MIDIGetClRefCon(OSType clientID)
  653. ;
  654.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  655.         Macro
  656.         _MIDIGetClRefCon
  657.             move.l              #$00880004,D0
  658.             dc.w                $A800
  659.         EndM
  660.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  661.         IMPORT_CFM_FUNCTION MIDIGetClRefCon
  662.     ENDIF
  663.  
  664. ;
  665. ; pascal void MIDISetClRefCon(OSType clientID, long refCon)
  666. ;
  667.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  668.         Macro
  669.         _MIDISetClRefCon
  670.             move.l              #$008C0004,D0
  671.             dc.w                $A800
  672.         EndM
  673.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  674.         IMPORT_CFM_FUNCTION MIDISetClRefCon
  675.     ENDIF
  676.  
  677. ;
  678. ; pascal short MIDIGetTCFormat(short refnum)
  679. ;
  680.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  681.         Macro
  682.         _MIDIGetTCFormat
  683.             move.l              #$00900004,D0
  684.             dc.w                $A800
  685.         EndM
  686.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  687.         IMPORT_CFM_FUNCTION MIDIGetTCFormat
  688.     ENDIF
  689.  
  690. ;
  691. ; pascal void MIDISetTCFormat(short refnum, short format)
  692. ;
  693.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  694.         Macro
  695.         _MIDISetTCFormat
  696.             move.l              #$00940004,D0
  697.             dc.w                $A800
  698.         EndM
  699.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  700.         IMPORT_CFM_FUNCTION MIDISetTCFormat
  701.     ENDIF
  702.  
  703. ;
  704. ; pascal void MIDISetRunRate(short refnum, short rate, long time)
  705. ;
  706.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  707.         Macro
  708.         _MIDISetRunRate
  709.             move.l              #$00980004,D0
  710.             dc.w                $A800
  711.         EndM
  712.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  713.         IMPORT_CFM_FUNCTION MIDISetRunRate
  714.     ENDIF
  715.  
  716. ;
  717. ; pascal Handle MIDIGetClientIcon(OSType clientID)
  718. ;
  719.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  720.         Macro
  721.         _MIDIGetClientIcon
  722.             move.l              #$009C0004,D0
  723.             dc.w                $A800
  724.         EndM
  725.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  726.         IMPORT_CFM_FUNCTION MIDIGetClientIcon
  727.     ENDIF
  728.  
  729. ;
  730. ; pascal ProcPtr MIDICallAddress(short callNum)
  731. ;
  732.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  733.         Macro
  734.         _MIDICallAddress
  735.             move.l              #$00A40004,D0
  736.             dc.w                $A800
  737.         EndM
  738.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  739.         IMPORT_CFM_FUNCTION MIDICallAddress
  740.     ENDIF
  741.  
  742. ;
  743. ; pascal void MIDISetConnectionProc(short refNum, ProcPtr connectionProc, long refCon)
  744. ;
  745.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  746.         Macro
  747.         _MIDISetConnectionProc
  748.             move.l              #$00A80004,D0
  749.             dc.w                $A800
  750.         EndM
  751.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  752.         IMPORT_CFM_FUNCTION MIDISetConnectionProc
  753.     ENDIF
  754.  
  755. ;
  756. ; pascal void MIDIGetConnectionProc(short refnum, ProcPtr *connectionProc, long *refCon)
  757. ;
  758.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  759.         Macro
  760.         _MIDIGetConnectionProc
  761.             move.l              #$00AC0004,D0
  762.             dc.w                $A800
  763.         EndM
  764.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  765.         IMPORT_CFM_FUNCTION MIDIGetConnectionProc
  766.     ENDIF
  767.  
  768. ;
  769. ; pascal void MIDIDiscardPacket(short refnum, MIDIPacketPtr packet)
  770. ;
  771.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  772.         Macro
  773.         _MIDIDiscardPacket
  774.             move.l              #$00B00004,D0
  775.             dc.w                $A800
  776.         EndM
  777.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  778.         IMPORT_CFM_FUNCTION MIDIDiscardPacket
  779.     ENDIF
  780.  
  781. ;
  782. ; pascal OSErr MDVRSignIn(OSType clientID, long refCon, Handle icon, Str255 name)
  783. ;
  784.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  785.         Macro
  786.         _MDVRSignIn
  787.             move.l              #$00B40004,D0
  788.             dc.w                $A800
  789.         EndM
  790.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  791.         IMPORT_CFM_FUNCTION MDVRSignIn
  792.     ENDIF
  793.  
  794. ;
  795. ; pascal void MDVRSignOut(OSType clientID)
  796. ;
  797.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  798.         Macro
  799.         _MDVRSignOut
  800.             move.l              #$00B80004,D0
  801.             dc.w                $A800
  802.         EndM
  803.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  804.         IMPORT_CFM_FUNCTION MDVRSignOut
  805.     ENDIF
  806.  
  807. ;
  808. ; pascal MDVRPtr MDVROpen(short portType, short refnum)
  809. ;
  810.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  811.         Macro
  812.         _MDVROpen
  813.             move.l              #$00BC0004,D0
  814.             dc.w                $A800
  815.         EndM
  816.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  817.         IMPORT_CFM_FUNCTION MDVROpen
  818.     ENDIF
  819.  
  820. ;
  821. ; pascal void MDVRClose(MDVRPtr driverPtr)
  822. ;
  823.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  824.         Macro
  825.         _MDVRClose
  826.             move.l              #$00C00004,D0
  827.             dc.w                $A800
  828.         EndM
  829.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  830.         IMPORT_CFM_FUNCTION MDVRClose
  831.     ENDIF
  832.  
  833. ;
  834. ; pascal void MDVRControlIn(MDVRPtr portPtr, MDVRInCtlPtr inputCtl)
  835. ;
  836.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  837.         Macro
  838.         _MDVRControlIn
  839.             move.l              #$00C40004,D0
  840.             dc.w                $A800
  841.         EndM
  842.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  843.         IMPORT_CFM_FUNCTION MDVRControlIn
  844.     ENDIF
  845.  
  846. ;
  847. ; pascal void MDVRControlOut(MDVRPtr portPtr, MDVROutCtlPtr outputCtl)
  848. ;
  849.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  850.         Macro
  851.         _MDVRControlOut
  852.             move.l              #$00C80004,D0
  853.             dc.w                $A800
  854.         EndM
  855.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  856.         IMPORT_CFM_FUNCTION MDVRControlOut
  857.     ENDIF
  858.  
  859. ;
  860. ; pascal void MDVRIn(MDVRPtr portPtr)
  861. ;
  862.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  863.         Macro
  864.         _MDVRIn
  865.             move.l              #$00CC0004,D0
  866.             dc.w                $A800
  867.         EndM
  868.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  869.         IMPORT_CFM_FUNCTION MDVRIn
  870.     ENDIF
  871.  
  872. ;
  873. ; pascal void MDVROut(MDVRPtr portPtr, char *dataPtr, short length)
  874. ;
  875.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  876.         Macro
  877.         _MDVROut
  878.             move.l              #$00D00004,D0
  879.             dc.w                $A800
  880.         EndM
  881.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  882.         IMPORT_CFM_FUNCTION MDVROut
  883.     ENDIF
  884.  
  885. ;
  886. ; pascal void MDVRNotesOff(MDVRPtr portPtr, short mode)
  887. ;
  888.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  889.         Macro
  890.         _MDVRNotesOff
  891.             move.l              #$00D40004,D0
  892.             dc.w                $A800
  893.         EndM
  894.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  895.         IMPORT_CFM_FUNCTION MDVRNotesOff
  896.     ENDIF
  897.  
  898.  
  899.     ENDIF ; __MIDI__ 
  900.  
  901.